package com.example.demo.mapper;

import com.example.demo.entity.AcceptInfo;
import com.example.demo.entity.SendInfo;
import com.example.demo.entity.SendInfoExample;
import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface SendInfoMapper {
    //订单模块begin
    @Delete("delete from send_info where order_id = #{order_id}")
    int deleteByPrimaryKey(String order_id);

    @Insert("insert send_info (order_id,sender_id,sender_address,order_create_time) values" +
            "(#{record.order_id},#{record.sender_id},#{record.sender_address},#{record.order_create_time})")
    int insert(@Param("record")SendInfo record);

    @Update("update send_info" +
            "    set sender_time = #{record.sender_time}," +
            "      sender_address = #{record.sender_address}"+
            "    where order_id = #{record.order_id}")
    int updateByPrimaryKey(@Param("record")SendInfo record);
    //订单模块end
}